package com.ewanghuiju.app.ui.pintuan.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ewanghuiju.app.R;
import com.ewanghuiju.app.model.bean.response.PintuanHotTuijianResponBean;

public class PintuanHotTuijianAdapter extends BaseQuickAdapter<PintuanHotTuijianResponBean, BaseViewHolder> {
    public PintuanHotTuijianAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, PintuanHotTuijianResponBean item) {
        if(item.getType()==1){
            helper.setVisible(R.id.layout_yhq,true);
            helper.setText(R.id.tv_yhq, item.getYhq());
            helper.setText(R.id.tv_zhuan, item.getZmoney());
        }
        helper.setText(R.id.tv_title, item.getTitle());
        helper.setText(R.id.tv_price, item.getPrice());
        ImageView riv = helper.getView(R.id.riv_shop_img);
        Glide.with(mContext).load(item.getImg()).into(riv);
    }
}
